home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
- Subject: Re: Hungarian notation
- Date: Wed, 31 Jan 96 12:11:16 GMT
- Organization: none
- Message-ID: <823090276snz@genesis.demon.co.uk>
- References: <30C40F77.53B5@swsbbs.com> <4dtv3gINNo9u@keats.ugrad.cs.ubc.ca> <4e5k6o$aci@grid.direct.ca> <4ej0ds$sju@rational.rational.com> <4em1ptINNn1@keats.ugrad.cs.ubc.ca>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4em1ptINNn1@keats.ugrad.cs.ubc.ca>
- c2a192@ugrad.cs.ubc.ca "Kazimir Kylheku" writes:
-
- >Right. To make a truly abstract data type for, say, time_t, one would have to
- >hide the fact that it is an integer (the inessential aspect)
-
- The C language makes no guarantee that time_t is an integer.
-
- >and provide
- >abstract operations for manipulating this type, such as functions to convert
- >some other date breakdwon into time_t, for calculating the difference between
- >two time_t's and such.
-
- That is precisely what the standard library does (localtime(), mktime(),
- difftime() etc.). The program never needs to know what the internal
- representation of time_t is. Your general point stands, you just picked
- a bad/debatable example.
-
- >I still maintain my point that typedefs are not necessary for good coding in C.
- >The aliasing for which they are useful can just as easily be accomplished with
- >pre-processor macros.
-
- Only in the simplest cases. They also help with debugging where the debugger
- is aware of typedef names.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-